package com.qk.management.mapper;

import com.qk.entity.Role;
import com.qk.dto.role.RoleDTO;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface RoleMapper {

    void insert(Role role);

    List<Role> selectByPage(RoleDTO dto);

    @Delete("delete from role where id = #{id}")
    void delete(Integer id);

    @Select("select * from role where id = #{id}")
    Role selectById(Integer id);

    @Update("update role set name = #{name}, label = #{label},remark = #{remark} where id = #{id}")
    void update(Role role);

    @Select("select * from role")
    List<Role> list();
}
